import React, {Component} from "react";
import {
	ScrollView,
	Text,
} from "react-native";
import Icon from 'react-native-vector-icons/FontAwesome';
import CustomTitle from '../public/CustomTitle';
import ImageArray from "../public/ImageArray";

export default class MyOrder extends React.Component{
	constructor(props) {
		super(props);
		this.state = {
			ImageBtn: [
				{url:require('../../imgs/u266.png'), text:'待付款',nav: "PendPay"},
				{url:require('../../imgs/u266.png'), text:'待收货',nav: "ToReceive"},
				{url:require('../../imgs/u266.png'), text:'待评价'},
				{url:require('../../imgs/u266.png'), text:'退换货',nav: "Returns"},
			]
		}
	}

	render(){
		return(
			<ScrollView>
				<CustomTitle 
					title="我的订单"
					rightText="查看全部订单"
					rightIcon={<Icon name="angle-double-right" size={18}/>}
					style={{borderBottomWidth: 1,paddingVertical:10,backgroundColor:gColor.whiteColor,
						borderBottomColor:gColor.borderColors}}
					onPress={() => this.props.nav.navigate("AllOrders")}
					textStyle={{fontSize:gFontSize.bigText}}
				/>
				<ImageArray 
					arrItems={this.state.ImageBtn}
					style={{flexDirection: "row",flexWrap: 'wrap', backgroundColor: gColor.whiteColor}}
					imageStyle={{width: 32, height: 32,marginVertical: 10}} 
					touchableStyle={{width: gScreen.width/4, alignItems: "center", paddingVertical: 5,
						borderBottomWidth: 1,borderBottomColor:gColor.borderColors}}
					navigation={this.props.nav}
				/>
			</ScrollView>
		)
	
	}
}